package com.unionbigdata.teaching.controller;

import com.unionbigdata.teaching.common.ApiResult;
import com.unionbigdata.teaching.entity.User;
import com.unionbigdata.teaching.model.vo.UserVO;
import com.unionbigdata.teaching.services.UserService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController("/test")
@Tag(name = "test",description = "提供用户管理相关的 REST 接口")
public class testController {
    @Autowired
    private UserService userService;

    @Operation(summary = "test11")
    @PostMapping("/test")
    public ApiResult<List<User>> test(){
        return ApiResult.ok(userService.getUsers());
    }
}
